import React, { Component } from 'react'
import { NavBar, Icon } from "antd-mobile";
import { withRouter } from "react-router-dom"
import "./JdNav.scss"
 class JdNav extends Component {
    render() {
        return (
            <NavBar
                mode="light"
                icon={this.props.left ? <Icon type="left"/> : ""}
                onLeftClick={() =>this.props.history.go(-1)}
            >{this.props.title}</NavBar>
        )
    }
}
export default withRouter(JdNav);